/**
 * 神州信息(2012)
 */
package net.abbp.report.designer;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JComponent;
import javax.swing.JToolBar;

import net.abbp.report.context.ReportContext;
import net.abbp.report.designer.menu.MainContextMenu;
import net.abbp.report.designer.toolbar.CommonToolBar;
import net.abbp.report.model.Cell;
import net.abbp.report.model.ReportModel;
import net.abbp.report.view.GridView;

/**
 * 报表设计器
 * 
 * @version 1.0
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ABBP 1.0
 * 
 *        <pre>
 * 历史：
 *      建立: 2012-7-22 lexloo
 * </pre>
 */
public class ReportDesigner extends JComponent {
    // 当前视图
    private GridView view;

    public ReportDesigner() {
        this.setLayout(new BorderLayout());

        view = new GridView(new ReportModel());
        view.setGridActionMenu(new MainContextMenu());
        this.add(view);

        JToolBar tlbMain = new CommonToolBar();
        this.add(tlbMain, BorderLayout.NORTH);

        ReportContext.INSTANCE.setCurrentView(view);
    }
}
